/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pin.db.procedures;

/**
 *
 * @author didyhu
 */
public class ConditionBase {

    String sql = null;

    public ConditionBase(String sql) {
        this.sql = sql;
    }

    @Override
    public String toString() {
        return sql;
    }

    public ConditionBase and(Object c) {


        String s = " (" + this.toString() + " AND " + c.toString() + ") ";

        return new ConditionBase(s);
    }

    public ConditionBase or(Object c) {

        String s = " (" + this.toString() + " OR " + c.toString() + ") ";

        return new ConditionBase(s);
    }
    }
